package com.zx._12_算法.数据结构.tree;

import com.zx._12_算法.TreeNode;

public class A4_树的属性 {

    public static void main(String[] args) {
        TreeNode root = TreeNode.buildTree("1(2(3(4,),5(,6)),7(8,9))#");
        System.out.println("数的值=" + root);

        System.out.println("树的节点数量=" + TreeNode.size(root));

        System.out.println("树的高度=" + TreeNode.height(root));

        System.out.println("查询1=" + TreeNode.find(root, 1));
        System.out.println("查询9=" + TreeNode.find(root, 9));
        System.out.println("查询6=" + TreeNode.find(root, 6));
    }
}
